package com.CST.mapper.cst.cb;

import com.CST.dto.cb.DateDTO;
import com.CST.entity.cb.AllocationCoefficient;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AllocationCoefficientMapper extends BaseMapper<AllocationCoefficient> {
    List<AllocationCoefficient> listAmortizationCodeSumValueByDate(DateDTO dateDTO);
    
    List<AllocationCoefficient> listCoefficientWithEmployee(DateDTO dateDTO);

    /**
     * 实际床日
     * @param dateDTO
     * @return
     */
    List<AllocationCoefficient> listCoefficientWithWard(DateDTO dateDTO);

    /**
     * 房屋面积
     * @param dateDTO
     * @return
     */
    List<AllocationCoefficient> listCoefficientWithArea(DateDTO dateDTO);

    /**
     * 门诊人次
     * @param dateDTO
     * @return
     */
    List<AllocationCoefficient> listCoefficientWithOutPatient(DateDTO dateDTO);

    /**
     * 出院人数
     * @param dateDTO
     * @return
     */
    List<AllocationCoefficient> listCoefficientWithLeave(DateDTO dateDTO);

    /**
     * 根据年月删除系数
     * @param dateDTO
     */
    void deleteByDate(DateDTO dateDTO);

    /**
     * 根据年进行系数插入
     */
    void insertByYear(@Param("list") List<AllocationCoefficient> coefficientList, @Param("year") Integer year);
}
